package projects.ufam.nodes.messages;

import sinalgo.nodes.Node;
import sinalgo.nodes.messages.Message;

public class AodvRreqMessage extends Message {
	static int _id = 0;
	private int id, hops;
	private Node source, destination;

	public AodvRreqMessage() {
		super();
	}

	public int getId() {
		return id;
	}

	public AodvRreqMessage( Node src, Node dst, int hops) {
		super();
		this.id = _id++;
		this.source = src;
		this.destination = dst;
		this.hops = hops;
	}
	

	@Override
	public Message clone() {
		Message m = new AodvRreqMessage(source, destination, hops);
		_id--;
		return m;
	}

	@Override
	public int getMessageSize() {
		return 1;
	}

	public Node getSource() {
		return source;
	}

	public void setSource(Node source) {
		this.source = source;
	}

	public Node getDestination() {
		return destination;
	}

	public void setDestination(Node destination) {
		this.destination = destination;
	}

	public void setId(int id) {
		this.id = id;

	}
	public int hashCode() {
		return id;
	}

	public int getHops() {
		return hops;
	}

	public void setHops(int hops) {
		this.hops = hops;
	}
	
}